#ifndef T1_RTC_H_
#define T1_RTC_H_

#include "iodef.h"

typedef struct {
        __IO uint32_t RTCDR;
        __IO uint32_t RTCMR;
        __IO uint32_t RTCLR;
        __IO uint32_t RTCEN;
        __IO uint32_t RTCMSK;
        __IO uint32_t RTCRIS;
        __IO uint32_t RTCMIS;
        __IO uint32_t RTCICR;
        __IO uint32_t Reserved;
        __IO uint32_t LOCK_EN;
}rtc_reg_t;

#define RTC_EN          _BIT(0)
#define RTC_IN          _BIT(0)
#define MATCH_LOCK      _BIT(5)
#define LOAD_LOCK       _BIT(4)
#define RTCMSK_LOCK     _BIT(2)
#define RTCICR_LOCK     _BIT(1)
#define RTCEN_LOCK      _BIT(0)

#define RTC     ((rtc_reg_t *)T1_RTC_BASE)

#endif /* T1_RTC_H_ */
